package com.yy.wga.common.core.enmus;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author lgw
 * @version JDK 8
 * @date 2025/3/14
 * @description 展示状态枚举
 */
@AllArgsConstructor
@Getter
public enum ShowType {
    SHOW(1, "展示"),
    NOT_SHOW(2, "不展示"),
    ;

    private final Integer type;
    private final String desc;

    /**
     * 展示状态
     *
     * @param type 类型
     * @return
     */
    public static ShowType getByType(Integer type) {
        if (type != null) {
            for (ShowType showType : ShowType.values()) {
                if (showType.getType().equals(type)) {
                    return showType;
                }
            }
        }
        return null;
    }
}
